# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-termcolor
_pkgname=termcolor
pkgver=2.4.0
pkgrel=1
pkgdesc="ANSII Color formatting for output in terminal."
url="https://pypi.org/project/termcolor/"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-gpep517 py3-installer py3-hatchling py3-hatch-vcs"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check"

replaces="py-termcolor" # Backwards compatibility
provides="py-termcolor=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/termcolor*.whl
}

sha512sums="
e715940ccc8863baae020345cabc8fc90b5bbbd5ef4b384de96920a90d97508cee6f863aa39a2c08971e58f45cf85ec73c0659715f54072bbc57612681138355  termcolor-2.4.0.tar.gz
"
